﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Guest.Master" AutoEventWireup="True"
    CodeBehind="List.aspx.cs" Inherits="ScrumLite.WebUx.ReviewsViews.List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        <%=ViewData.ProjectName%></h1>
    <hr />
    <h2>
        Reviews</h2>
    <br />
    <div class="actions">
        <%=Html.ActionLink("New", new { Controller = "Reviews", projectId = ViewData.ProjectId.ToString(), Action = "New" })%>
    </div>
    <br />
    <table class="grid">
        <tr>
            <th>
                Occurred On
            </th>
            <th>
                Conducted By
            </th>
            <th>
                Evidence Url
            </th>
            <th>
                &nbsp;
            </th>
        </tr>
        <% foreach (ScrumLite.Services.Contracts.Review review in ViewData.Reviews)
           {%>
        <tr>
            <td>
                <%=review.OccurredOn.ToString("yyyy-MM-dd")%>
            </td>
            <td>
                <%=review.ConductedBy%>
            </td>
            <td>
                <a href="<%=review.EvidenceUrl %>">
                    <%=review.EvidenceUrl %></a>
            </td>
            <td class="btnEdit">
                <%=Html.ActionLink("Edit", new { Controller = "Reviews", Action = "Edit", projectId = ViewData.ProjectId.ToString(), Id = review.Id.ToString() })%>
            </td>
        </tr>
        <%} %>
    </table>
    <br />
    <div class="actions">
        <%=Html.ActionLink("New", new { Controller = "Reviews", projectId = ViewData.ProjectId.ToString(), Action = "New" })%>
    </div>
</asp:Content>
